(function($){
        
	    $.fn.extend({
	        jvitSlide: function(options) {
                var self = this;
                var defaults = {
	                slideProperties: {},
	            }
	            var options =  $.extend(defaults, options);
                init();
                
                function jvitSlide()
                {
                    var time_current = 0;
                    var timeAll = 0
                    for(var i = 0; i < Object.keys(options.slideProperties).length; i++) {
                        var timeout = options.slideProperties[i].timeout;
                        var sliceEffectType = options.slideProperties[i].sliceEffectType;
                        timeAll = options.slideProperties[i].timeout;
                        console.log(timeAll);
                        //jvitAmination();
                    }
                    
                }
                
                function init()
                {
                    jvitSlide();
                    jvitAmination();
                }
                
                function jvitAmination() {
                    var curImg = $('#slide li.current');
                    var nextImg = curImg.next();
                    console.log(nextImg.length);
                    if (nextImg.length == 0) {
                        nextImg = $('#slide li:first');
                    };
                    $('#slide li').css({display: "none"});
                    
                    curImg.removeClass('current').addClass('previous');
                    nextImg.css({display: "block", opacity:0}).addClass('current').animate({opacity:1}, 1000, function() {
                        curImg.removeClass('previous');
                    });
                    setTimeout(jvitAmination, 4000);
                }
                
	        }
	    });       
})(jQuery);



